var metas = document.getElementsByTagName('meta');
var total = metas.length;

for (var i=0;i<total;i++) {
	var meta = metas[i];
	meta.name = meta.name.toLowerCase();
	if ((meta.name=='icbm')||(meta.name=='geo.position')) {
		var regexp_clean = new RegExp('[^0-9;,.-]','g');
		var value = metas[i].content;
		value = value.replace(regexp_clean,'');
		value = value.replace(';',',');
		var coordinates = value.split(',');
		chrome.extension.sendRequest({message: "geo", geoLat:coordinates[0], geoLong:coordinates[1]});
	}
}
